package com.heer.gymnasium.module.reservation.beans;

import com.heer.gymnasium.base.BaseBean;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by yan
 * on 2018/1/25
 * 订场列表Item实体类
 */

public class ReservationItemBean extends BaseBean {

    private String id;
    private String time;
    private String store_num;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getStore_num() {
        return store_num;
    }

    public void setStore_num(String store_num) {
        this.store_num = store_num;
    }

    public static List<ReservationItemBean> dataChange(List<ReservationItemResponseBean> data) {
        List<ReservationItemBean> newList = new ArrayList<>();
        for (ReservationItemResponseBean item : data) {
            ReservationItemBean bean = new ReservationItemBean();
            bean.setStore_num(item.getCount());
            bean.setTime(item.getDate());
            newList.add(bean);
        }
        return newList;
    }

    public static Collection<? extends String> getStringList(List<ReservationItemResponseBean> data) {
        List<String> stringList = new ArrayList<>();
        for (ReservationItemResponseBean item : data) {
            stringList.add(item.getDate());
        }
        return stringList;
    }
}
